package org.SSV.MN.client;

import org.SSV.MN.client.usr.Composite201941;
import org.SSV.MN.client.usr.Composite661726;
import org.SSV.MN.client.usr.Composite661727;
import org.SSV.MN.client.usr.Composite661728;
import org.SSV.MN.client.usr.Composite661729;

import com.google.gwt.core.client.EntryPoint;
import com.google.gwt.user.client.*;
import com.google.gwt.user.client.ui.*;

/**
 * Entry point classes define <code>onModuleLoad()</code>.
 */
public class NLES extends ScrollPanel implements EntryPoint,ClickListener{

	protected TabPanel TabPanel235978 = null;
	protected AbsolutePanel AbsolutePanel386872 = null;
	protected Composite661726 Composite661726 = null;
	protected Composite661727 Composite661727 = null;
	protected Composite661728 Composite661728 = null;
	protected Composite661729 Composite661729 = null;
	protected Composite201941 Composite201941 = null;
	protected ScrollPanel ScrollPanel601980 = null;
	protected TextArea TextArea327647 = null;
	protected Button Button892150 = null;
	protected Button Button930888 = null;
	protected Button Button533958 = null;
	protected Button Button740675 = null;
	protected Button Button249806 = null;
	protected FlowPanel FlowPanel37119 = null;
	protected Label Label294048 = null;
	protected TextBox TextBox771492 = null;
	protected RadioButton RadioButton181072 = null;
	protected RadioButton RadioButton295339 = null;
	protected CheckBox CheckBox57168 = null;
	protected HTML Html109672 = null;
	protected TextBox TextBox295678 = null;

	public NLES(){
		super();
		initialize();
		layout();
		setProperties();
	}

	/**
	 * This is the entry point method.
	 */
	public void onModuleLoad() {
		RootPanel.get().add(this);
	}

	protected void initialize(){
		TabPanel235978 = new TabPanel();
		AbsolutePanel386872 = new AbsolutePanel();
		Composite661726 = new Composite661726();
		Composite661727 = new Composite661727();
		Composite661728 = new Composite661728();
		Composite661729 = new Composite661729();
		Composite201941 = new Composite201941();
		ScrollPanel601980 = new ScrollPanel();
		TextArea327647 = new TextArea();
		Button892150 = new Button();
		Button930888 = new Button();
		Button533958 = new Button();
		Button740675 = new Button();
		Button249806 = new Button();
		FlowPanel37119 = new FlowPanel();
		Label294048 = new Label();
		TextBox771492 = new TextBox();
		RadioButton181072 = new RadioButton("");
		RadioButton295339 = new RadioButton("");
		CheckBox57168 = new CheckBox();
		Html109672 = new HTML();
		TextBox295678 = new TextBox();
	}

	protected void layout(){
		add(TabPanel235978);

		TabPanel235978.add(AbsolutePanel386872, NLS.constants().NLES());
		TabPanel235978.add(new Label(""), NLS.constants().Text());
		TabPanel235978.add(new Label(""), NLS.constants().Text());

		AbsolutePanel386872.add(Composite661726, 11,10);
		AbsolutePanel386872.add(Composite661727, 114,10);
		AbsolutePanel386872.add(Composite661728, 423,10);
		AbsolutePanel386872.add(Composite661729, 523,10);
		AbsolutePanel386872.add(Composite201941, 11,154);
		AbsolutePanel386872.add(ScrollPanel601980, 379,151);
		AbsolutePanel386872.add(Button892150, 379,294);
		AbsolutePanel386872.add(Button930888, 438,376);
		AbsolutePanel386872.add(Button533958, 438,412);
		AbsolutePanel386872.add(Button740675, 379,412);
		AbsolutePanel386872.add(Button249806, 379,377);
		AbsolutePanel386872.add(FlowPanel37119, 523,293);

		ScrollPanel601980.add(TextArea327647);

		FlowPanel37119.add(Label294048);
		FlowPanel37119.add(TextBox771492);
		FlowPanel37119.add(RadioButton181072);
		FlowPanel37119.add(RadioButton295339);
		FlowPanel37119.add(CheckBox57168);
		FlowPanel37119.add(Html109672);
		FlowPanel37119.add(TextBox295678);
	}

	protected void setProperties(){

		TabPanel235978.setHeight("523");
		TabPanel235978.setWidth("679");
		TabPanel235978.selectTab(0);

		AbsolutePanel386872.setHeight("520");
		AbsolutePanel386872.setWidth("676");

		ScrollPanel601980.setHeight("133");
		ScrollPanel601980.setWidth("283");

		TextArea327647.setHeight("113");
		TextArea327647.setWidth("270");

		Button892150.setText("S");
		Button892150.addClickListener(NLES.this);
		Button892150.setHeight("74");
		Button892150.setWidth("112");

		Button930888.setHTML("<...>");
		Button930888.addClickListener(NLES.this);
		Button930888.setHeight("21");
		Button930888.setWidth("53");

		Button533958.setText("<>");
		Button533958.addClickListener(NLES.this);
		Button533958.setHeight("22");
		Button533958.setWidth("53");

		Button740675.setText("n++");
		Button740675.setHeight("21");
		Button740675.setWidth("53");

		Button249806.setText("n - -");
		Button249806.setHeight("21");
		Button249806.setWidth("52");

		FlowPanel37119.setHeight("172");
		FlowPanel37119.setWidth("106");

		Label294048.setText("tol\u003A");
		Label294048.setWidth("118");

		TextBox771492.setText("1E-08");
		TextBox771492.setHeight("28");
		TextBox771492.setWidth("118");

		RadioButton181072.setChecked(true);
		RadioButton181072.setText("NR.............");
		RadioButton181072.addClickListener(NLES.this);
		RadioButton181072.setHeight("24");
		RadioButton181072.setWidth("79");

		RadioButton295339.setText("BSM............");
		RadioButton295339.addClickListener(NLES.this);
		RadioButton295339.setHeight("25");
		RadioButton295339.setWidth("78");

		CheckBox57168.setText("Verbose(CSV)");
		CheckBox57168.setHeight("22");
		CheckBox57168.setWidth("114");

		Html109672.setHTML("n\u003D");

		TextBox295678.setText("3");
		TextBox295678.setHeight("23");
		TextBox295678.setWidth("51");
		setSize("100%", "100%");
	}
//events
	public void onClick(Widget sender){
		if(sender.equals(Button892150)){
			org.SSV.MN.client.usr.TempMth.Solve_3(new Widget[] {
					Composite201941, Composite661726, Composite661727,
					Composite661728, Composite661729, TextArea327647,
					FlowPanel37119 });
		}
		if(sender.equals(Button930888)){
			org.SSV.MN.client.usr.TempMth.reset(new Widget[] {
					Composite201941, Composite661726, Composite661727,
					Composite661728, Composite661729, TextArea327647,
					FlowPanel37119 });
			onClick(RadioButton181072);
		}
		if(sender.equals(Button533958)){
			org.SSV.MN.client.usr.TempMth.delStr(new Widget[] {
					Composite201941, Composite661726, Composite661727,
					Composite661728, Composite661729, TextArea327647,
					FlowPanel37119 });
			onClick(RadioButton181072);
		}
		if(sender.equals(RadioButton181072)){
			this.Composite201941.setVisible(true);
		}
		if(sender.equals(RadioButton295339)){
			this.Composite201941.setVisible(false);
		}
	}

}
